Skip to content

feat(router): add reactive query and route parameter utilities#3

Merged
wrxck merged 2 commits intomainfrom
feat/router-query-params
Feb 11, 2026
Merged

feat(router): add reactive query and route parameter utilities#3
wrxck merged 2 commits intomainfrom
feat/router-query-params

Conversation

@wrxck
Copy link
Owner

@wrxck wrxck commented Feb 11, 2026

Summary

  • Add queryParams — computed signal of all URL query params
  • Add getQueryParam(name) / setQueryParam(name, value) for single params
  • Add setQueryParams(params) for batch updates
  • Add getRouteParam(name) for reactive route path parameters
  • All derived from currentRoute signal, update automatically on navigation

Test plan

  • queryParams returns correct object / empty when no params
  • Reactive updates on navigation
  • getQueryParam returns value or null
  • setQueryParam adds, updates, and removes params
  • setQueryParams handles batch set/remove
  • getRouteParam reads dynamic route segments
  • All 480 tests pass, build clean

Matt Hesketh added 2 commits February 11, 2026 16:52
Add signal-based helpers for working with URL query parameters and
route path parameters:

- queryParams — computed signal of all query params as Record
- getQueryParam(name) — computed signal for a single query param
- setQueryParam(name, value) — update/remove a single param
- setQueryParams(params) — update/remove multiple params at once
- getRouteParam(name) — computed signal for a route path param

All reactive utilities derive from currentRoute and update
automatically on navigation. 12 new tests.
@wrxck wrxck merged commit 92e9404 into main Feb 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant